import request from '@/utils/request'

// 查询短信发送列表
export function listSmsRecord(query) {
  return request({
    url: '/Sms/SmsRecord/list',
    method: 'get',
    params: query
  })
}
// 查询短信发送数量
export function listSmsCount(query) {
  return request({
    url: '/Sms/SmsRecord/listcount',
    method: 'get',
    params: query
  })
}
// 统计图-发送数量
export function Listfsl(query) {
  return request({
    url: '/Sms/SmsRecord/listfsl',
    method: 'get',
    params: query
  })
}
// 短信发送数量-分类汇总
export function Listfslfl(query) {
  return request({
    url: '/Sms/SmsRecord/listfslfl',
    method: 'get',
    params: query
  })
}
// 指定通道客户价格
export function Listkhjg(query) {
  return request({
    url: '/Sms/SmsRecord/listkhjg',
    method: 'get',
    params: query
  })
}

export function getPriceByUserId(userId) {
  return request({
    url: '/Sms/smsprice/user/'+userId,
    method: 'get'
  })
}

// 获取通道、客户、签名等数量分类
export function Listcountval(query) {
  return request({
    url: '/Sms/SmsRecord/listcountval',
    method: 'get',
    params: query
  })
}

// 查询短信发送详细
export function getSmsRecord(id) {
  return request({
    url: '/Sms/SmsRecord/' + id,
    method: 'get'
  })
}

// 新增短信发送
export function addSmsRecord(data) {
  return request({
    url: '/Sms/SmsRecord',
    method: 'post',
    data: data
  })
}

// 修改短信发送
export function updateSmsRecord(data) {
  return request({
    url: '/Sms/SmsRecord',
    method: 'put',
    data: data
  })
}

// 删除短信发送
export function delSmsRecord(id) {
  return request({
    url: '/Sms/SmsRecord/' + id,
    method: 'delete'
  })
}

// 短信发送
export function sendSms(data) {
  return request({
    url: '/Sms/SmsRecord/SendSms',
    method: 'post',
    data: data
  })
}
